package com.fate.system.vo.org;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fate.framework.dto.TreeNodeDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@EqualsAndHashCode(callSuper = true)
public class OrgTreeVO extends TreeNodeDTO {
  /** 组织名 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "org_name")
  @Schema(description = "组织名")
  @Length(max = 255, message = "编码长度不能超过255")
  private String orgName;

  /** 机构类型 字典org_type 1公司 2子公司 3部门 4小组 */
  @Size(max = 64, message = "编码长度不能超过64")
  @TableField(value = "org_type")
  @Schema(description = "机构类型 字典org_type 1公司 2子公司 3部门 4小组")
  @Length(max = 64, message = "编码长度不能超过64")
  private String orgType;

  /** 机构全称 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "org_full_name")
  @Schema(description = "机构全称")
  @Length(max = 255, message = "编码长度不能超过255")
  private String orgFullName;

  /** 机构代码 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "org_path")
  @Schema(description = "机构代码")
  @Length(max = 255, message = "编码长度不能超过255")
  private String orgPath;

  /** 机构全路径代码 */
  @TableField(value = "org_full_path")
  @Schema(description = "机构全路径代码")
  private String orgFullPath;

  /** 备注 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "remark")
  @Schema(description = "备注")
  @Length(max = 255, message = "编码长度不能超过255")
  private String remark;

  /** 领导id集合 */
  @TableField(value = "leader_ids")
  @Schema(description = "领导id集合")
  private List<String> leaderIds;

  /** 创建时间 */
  @TableField(value = "gmt_create")
  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime gmtCreate;

  /** 修改时间 */
  @TableField(value = "gmt_modified")
  @Schema(description = "修改时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime gmtModified;

  /** 租户id */
  @Size(max = 64, message = "编码长度不能超过64")
  @TableField(value = "tenant_id")
  @Schema(description = "租户id")
  @Length(max = 64, message = "编码长度不能超过64")
  private String tenantId;

  /** 创建者id */
  @Size(max = 64, message = "编码长度不能超过64")
  @TableField(value = "creator_id")
  @Schema(description = "创建者id")
  @Length(max = 64, message = "编码长度不能超过64")
  private String creatorId;

  /** 逻辑删除标志 */
  @TableField(value = "deleted")
  @Schema(description = "逻辑删除标志")
  private Integer deleted;
}
